### The URL at which the project is available.
{% if env == 'staging' %}
APP_URL = 'https://src.stg.fedoraproject.org/'
{% else %}
APP_URL = 'https://src.fedoraproject.org/'
{% endif %}

WEBHOOK = True
### Folder containing to the git repos
GIT_FOLDER = '/srv/git/repositories'

### Folder containing the docs repos
ENABLE_DOCS = False
DOCS_FOLDER = None

### Folder containing the pull-requests repos
REQUESTS_FOLDER = '/srv/git/repositories/requests'

### Folder containing the tickets repos
ENABLE_TICKETS = True
ENABLE_TICKETS_NAMESPACE = ["tests"]
TICKETS_FOLDER = '/srv/git/repositories/tickets'

### Folder containing the clones of the remotes git repo
REMOTE_GIT_FOLDER = '/srv/git/remotes'

### Folder where to run gl-compile-conf from
GITOLITE_HOME = '/srv/git/'

### Configuration file for gitolite
GITOLITE_CONFIG = '/srv/git/.gitolite/conf/gitolite.conf'

### File to include at the top of the gitolite configuration file
GITOLITE_PRE_CONFIG = '/var/tmp/gitolite-prefix.txt'

### Temp folder to be used to make the clones to work around bug in libgit2:
## refs: https://github.com/libgit2/libgit2/issues/2965
## and   https://github.com/libgit2/libgit2/issues/2797
TMP_FOLDER = '/srv/tmp'

REDIS_HOST = '0.0.0.0'
REDIS_PORT = 6379
REDIS_DB = 0

# Configuration item that are specific for this odd pagure instance
CASE_SENSITIVE = True

ENABLE_NEW_PROJECTS = True
ENABLE_DEL_PROJECTS = False
ENABLE_DEL_FORKS = True
ENABLE_GROUP_MNGT = False
DEPLOY_KEY = False
{% if env == 'staging' %}
LOCAL_SSH_KEY = True
{% else %}
LOCAL_SSH_KEY = False
{% endif %}
ALLOW_DELETE_BRANCH = False
EMAIL_ON_WATCHCOMMITS = False
GIT_HOOK_DB_RO = True
LOG_ALL_COMMITS = True
ALWAYS_FEDMSG_ON_COMMITS = True
FEDMSG_NOTIFICATIONS = False
FEDORA_MESSAGING_NOTIFICATIONS = True

DISABLED_PLUGINS = [
    "IRC", "Pagure tickets", "Read the Doc", "Fedmsg",
    "Block Un-Signed commits",
]

GITOLITE_BACKEND = 'distgit'

BLACKLISTED_GROUPS = ['forks', 'group']

# ACL settings
ACL_BLOCK_UNSPECIFIED = False
ACL_PROTECTED_NAMESPACES = ['rpms', 'modules', 'container']
RCM_GROUP = 'relenggroup'
RCM_BRANCHES = ['refs/heads/f[0-9]+', 'refs/tags/.*', 'refs/heads/.*']
{% if env == 'staging' %}
# Pushing to c* stuff and master is never allowed
BLACKLIST_RES = ['refs/heads/c[0-9]+.*']
# Pushing to (f|epel|el|olpc)(num+) that is not previously approved
# (supported branches, ie: configured and active in PDC) is not allowed.
UNSPECIFIED_BLACKLIST_RES = ['refs/heads/main',
                             'refs/heads/rawhide',
                             'refs/heads/f[0-9]+',
                             'refs/heads/epel[0-9]+',
                             'refs/heads/el[0-9]+',
                             'refs/heads/olpc[0-9]+',
# master branch is used only for modules
# See https://pagure.io/releng/issue/10139#comment-741194
                             'refs/heads/master']
{% else %}
# Pushing to c* stuff and master is never allowed
BLACKLIST_RES = ['refs/heads/c[0-9]+.*', 'refs/heads/master']
# Pushing to (f|epel|el|olpc)(num+) that is not previously approved
# (supported branches, ie: configured and active in PDC) is not allowed.
UNSPECIFIED_BLACKLIST_RES = ['refs/heads/main',
                             'refs/heads/rawhide',
                             'refs/heads/f[0-9]+',
                             'refs/heads/epel[0-9]+',
                             'refs/heads/el[0-9]+',
                             'refs/heads/olpc[0-9]+']
{% endif %}

PDC_BRANCH_OVERRIDES = {"rpms": {"refs/heads/main": "refs/heads/rawhide"}}


ALLOW_HTTP_PUSH = True

PDC_URL = 'https://pdc{{ env_suffix }}.fedoraproject.org/rest_api/v1/'
ORACULUM_URL = "https://packager-dashboard{{ env_suffix }}.fedoraproject.org/api/"

SSH_KEYS_OPTIONS = 'restrict,command="/usr/libexec/pagure/aclchecker.py %(username)s"'

{% if env == 'staging' %}
GIT_AUTH_BACKEND = 'pagure'
SSH_KEYS_USERNAME_EXPECT = 'git'
{% else %}
SSH_KEYS_USERNAME_LOOKUP = True
{% endif %}

HTTP_REPO_ACCESS_GITOLITE = None

SSH_COMMAND_NON_REPOSPANNER = ([
    "/usr/libexec/git-core/%(cmd)s",
    "%(repopath)s",
], {"GL_USER": "%(username)s"})

EXTERNAL_COMMITTER = {
    'cvsadmin': {},
    'provenpackager': {
        'exclude': []
    }
}

SSH_ACCESS_GROUPS = ["packager"]
BYPASS_PR_ONLY_GROUPS = ["provenpackager"]
ALLOW_API_UPDATE_GIT_TAGS = False
GIT_DEFAULT_BRANCH = "rawhide"
SHORT_LENGTH = 7

{% if env == "staging" %}
ACL_DEBUG = True

{% endif %}
